
<div class="kehoaches">
	<h2><?php //__('Kế hoạch tác nghiệp của '.$tendv[0] ['donvis'] ['tendv']);?></h2>
	<table cellpadding="0" cellspacing="0" id="tables">
	<tr>
			<th><?php echo 'STT';?></th>
			<th><?php echo 'Thời gian';?></th>
			<th class="actions"><?php __('Cập nhật');?></th>
	</tr>
	<?php
	$i = 0;$stt=0;
	foreach ($kehoaches as $kehoach):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<td><?php echo $stt=$stt+1; ?>&nbsp;</td>
		<td>
			<?php 
            If((date('d-m-Y',strtotime(
                    $kehoach['Thoigian']['ngaykt']))-date('d-m-Y',
                    strtotime($kehoach['Thoigian']['ngaybd'])))<8)
                echo $kehoach['Thoigian']['thoigian']; 
            else
                echo '<strong>'.$kehoach['Thoigian']['thoigian'].'</strong>'; 
            ?>
		</td>
       
        
		<td class="actions">
			<?php 
                If((date('d-m-Y',strtotime(
                    $kehoach['Thoigian']['ngaykt']))-date('d-m-Y',
                    strtotime($kehoach['Thoigian']['ngaybd'])))<8) {
              echo $this->Html->link(__('Kế hoạch tuần', true), array('controller'=>'nvngays','action' => 'suanv', $kehoach['Kehoach']['id'],$nv_id));
        } else{
            echo $this->Html->link(__('Công việc chỉ thị', true), array('controller'=>'nvchithis','action' => 'index', $kehoach['Kehoach']['id'],$nv_id));
        
        }
              
                 
                 
			     
			        
                ?>
                   
                    
		</td>
	</tr>
<?php endforeach; ?>
	</table>
    <br>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Trang %page%/%pages%, hiện có %count% mẫu tin', true)
	));
	?>	</p>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>
